package com.hpf.lease.web.admin.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hpf.lease.model.bean.ViewAppointment;
import com.hpf.lease.web.admin.dto.AppointSearchSubmitDto;
import com.hpf.lease.web.admin.mapper.ViewAppointmentMapper;
import com.hpf.lease.web.admin.service.ViewAppointmentService;
import com.hpf.lease.web.admin.vo.AppointmentVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author GOD
* @description 针对表【view_appointment(预约看房信息表)】的数据库操作Service实现
* @createDate 2024-08-29 15:00:50
*/
@Service
public class ViewAppointmentServiceImpl extends ServiceImpl<ViewAppointmentMapper, ViewAppointment>
    implements ViewAppointmentService {

    @Override
    public Page<AppointmentVo> getPage(AppointSearchSubmitDto submitDto) {
        Page<AppointmentVo> page = new Page<>(submitDto.getCurrent(),submitDto.getSize());
        List<AppointmentVo> list = baseMapper.getPage(page,submitDto);
        page.setRecords(list);
        return page;
    }
}




